From: Florian Müllner Date: Mon, 24 Jun 2013 16:09:04 +0000 (+0200) Subject: st: Be more forgiving when calling get_theme_node() on unstaged widgets X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4017 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e70c0d3e2dbf16e933520794e499911f63e0a2c1;p=gnome-shell.git st: Be more forgiving when calling get_theme_node() on unstaged widgets While it is obviously still an error to call get_theme_node() on a widget that hasn't been added to the stage hierarchy yet, asserting on it hasn't proven too successful in avoiding those errors - it's likely the most frequent reason for crash reports. Just accept that there'll always be code paths where we can hit this case and make it non-fatal. https://bugzilla.gnome.org/show_bug.cgi?id=610279 --- diff --git a/src/st/st-widget.c b/src/st/st-widget.c index 91db0c3d2..9712cb973 100644 --- a/src/st/st-widget.c +++ b/src/st/st-widget.c @@ -643,8 +643,9 @@ st_widget_get_theme_node (StWidget *widget) if (stage == NULL) { - g_error ("st_widget_get_theme_node called on the widget %s which is not in the stage.", - st_describe_actor (CLUTTER_ACTOR (widget))); + g_critical ("st_widget_get_theme_node called on the widget %s which is not in the stage.", + st_describe_actor (CLUTTER_ACTOR (widget))); + return g_object_new (ST_TYPE_THEME_NODE, NULL); } if (parent_node == NULL)